package com.kaluli.project.job;
import java.text.SimpleDateFormat;
import java.util.Date;

import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;

@Configuration
@Component
public class ScheduledTasks {
	private static final SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm:ss");
	
	@Scheduled(cron="0/5 * *  * * ? ")
	public void reportCurrentTime(){
		System.out.println("The time is now " + dateFormat.format(new Date()));
	}
}
